{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "3bf8e892-7dcf-41cf-bbc5-bac98bb95ca2",
   "metadata": {},
   "source": [
    "Chapter 06\n",
    "# 乘法\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "c0e0bb69-0e60-4910-9af3-5b26e8cf384f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数值乘法\n",
    "a = 10    # 整数\n",
    "b = 20.0  # 浮点数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d87536fb-2bbd-4ef9-9e61-89a5477a2fd9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "200.0\n"
     ]
    }
   ],
   "source": [
    "c = a * b # 浮点数\n",
    "print(c)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4028934d-7677-47b6-960d-fdbaa2770867",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 字符串复制\n",
    "str_a = \"10\"    # str(a)\n",
    "str_b = \"20.0\"  # str(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "182310c7-a6c0-4298-bb9d-0f7f6ff38b54",
   "metadata": {},
   "outputs": [],
   "source": [
    "str_c = str_a * 3\n",
    "str_d = str_b * 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ad0d5de5-43ee-4999-a81b-940974924f7e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "101010\n",
      "20.020.0\n"
     ]
    }
   ],
   "source": [
    "print(str_c)  \n",
    "print(str_d)  "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
